import React, { useEffect, useState } from 'react'
import { getUser } from "../../api/request"
import "./Setting.scss"
import { LoadingOutlined, PlusOutlined } from '@ant-design/icons';
import { message, Upload } from 'antd';
import type { UploadChangeParam } from 'antd/es/upload';
import type { RcFile, UploadFile, UploadProps } from 'antd/es/upload/interface';
const App: any = () => {
    const [userInfo, setUserInfo]: any = useState()
    useEffect(() => {
        getUser().then((res) => {
            // console.log(111, res);
            setUserInfo(res.data)
        })
    }, [])




    console.log(111, userInfo);

    if (userInfo) {
        return (
            <>
                <div className="fillcontain">
                    <header className="admin_title">管理员信息</header>
                    <div className="admin_set">
                        <ul>
                            <li>
                                <span>姓名：</span><span>{userInfo.user_name}</span>
                            </li>
                            <li>
                                <span>注册时间：</span><span>{userInfo.create_time}</span>
                            </li>
                            <li>
                                <span>管理员权限：</span><span>{userInfo.admin}</span>
                            </li>
                            <li>
                                <span>管理员 ID：</span><span>{userInfo.id}</span>
                            </li>
                            <li>
                                <span>更换头像：</span>
                                <span>
                                    <img style={{
                                        width:120,
                                        height:120
                                    }} src={"//elm.cangdu.org/img/"+"183cf35a36e109289.png"} alt="" />
                                </span>
                            </li>
                        </ul>
                    </div>
                </div>
            </>
        )
    }

}

export default App